package cn.good.yan.basics.t1;

import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.context.annotation.PropertySource;
import org.springframework.stereotype.Component;

/**
 * 1. 配置类
 *   1.@PropertySource - 导入Spring配置文件，该注解，可以导入之前XML 的Bean对象
 * @author shengren.yan
 * @create 2023-09-27
 */
// 获取局部配置文件  - 解决 中文乱码，指定utf-8
@PropertySource(value = {"classpath:emp.properties"}, ignoreResourceNotFound = true,encoding = "UTF-8" )
@Component
@ConfigurationProperties(prefix = "home")
public class Con2 {

    private String name;

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

}
